package eerbaar.v2.app.strategy;

import eerbaar.area.IArea;
import eerbaar.client.internal.ctr.operator.area.IValue;
import eerbaar.client.internal.ctr.operator.area.ValueArea;
import eerbaar.client.internal.ctr.operator.area.ValueAreaHelper;
import eerbaar.elements.IElement;

public class StrategyUtil {

    public static void clearValueArea() {

        ValueArea valueArea = ValueAreaHelper.getValueArea();
        if (valueArea == null) {
            return;
        }

        IArea area = valueArea.getValueArea();
        IElement[] elements = area.getElements();

        for (IElement e : elements) {
            IValue value = e.getExtension(IValue.class);
            value.set(0);
        }
    }

}
